package com.yh.csx.bsf.flow.core.base;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author: chejiangyi
 * @version: 2019-10-23 19:23
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@XStreamAlias("ChooseUser")
public class ChooseUser {
    @XStreamAsAttribute
    @XStreamAlias("userRole")
    private UserRoleEnum userRoleEnum;
//    @XStreamAsAttribute
//    private String method;
    @XStreamAsAttribute
    private String value;
    @XStreamAsAttribute
    private String description;
    @XStreamAsAttribute
    private SetOperationEnum setOperationEnum;

    public enum SetOperationEnum{
        /**
         * 并集
         */
        Union(0,"并集"),
        /**
         * 交集
         */
        Intersect(1,"交集"),
        /**
         * 差集
         */
        Difference(2,"差集");
        public int Value;
        public String Desc;

        SetOperationEnum(int value,String desc){
            this.Value = value;
            this.Desc = desc;
        }
    }
    public enum  UserRoleEnum{
        /**
         * 用户
         */
        User(0,"用户工号"),
        /**
         * 变量
         */
        Variable(1,"变量集合"),
        /**
         * 方法(支持变量参数)
         */
        Method(2,"动态调用");
        /**
         *
         */
        public int Value;
        public String Desc;

        UserRoleEnum(int value,String desc){
            this.Value = value;
            this.Desc = desc;
        }
    }
}
